#ifndef MATERIAL_H
#define MATERIAL_H

#include <QObject>
#include <QJsonObject>

class Material : public QObject
{
    Q_OBJECT
public:
    explicit Material(QObject *parent = nullptr);

public:
    static Material* FromJson(QJsonObject &data);

    QString GetValidityCountString();
    QString GetSaveTypeString();
    QString GetOperationTypeString();

public:
    QString CreateTime;
    int DateCount;
    int DateUnit;
    int HasPart;
    int HasWarn;
    int Id;
    QString Name;
    int OperationType;
    int PartCount;
    int PartUnit;
    QString Remark;
    int SaveType;
    QString ShortName;
    int Status;
    QString TypeName;
    int Unit;
    int WarnCount;
    int WarnUnit;

signals:
};

#endif // MATERIAL_H
